<template>
    <div class="card">
        <div class="header">
            <span class="source">{{ from }}</span>
            <button class="settings-button">设置</button>
        </div>
        <div class="title">
            {{ title }}
        </div>
        <div class="content">
            {{ content }}
        </div>
        <div class="footer">
            <button class="bottom-button">编辑</button>
        </div>
    </div>
</template>
  
<script>
export default {
    name: 'Card',
    props: {
        from: {
            type: String,
            default: '未知来源'
        },
        title: {
            type: String,
            default: '默认标题'
        },
        content: {
            type: String,
            default: '这里显示卡片内容。'
        }
    }
};
</script>
  
 
<style scoped>
.card {
    width: 33vw;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 2vw;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.source {
    font-weight: bold;
}

.settings-button {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.title {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 10px;
}

.content {
    margin: 10px 0;
    text-indent: 2em;

}

.footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.bottom-button {
    padding: 5px 10px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
</style>